<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>会员信息修改</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/font.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/xadmin.css">
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/Swiper/3.4.2/css/swiper.min.css">
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/xadmin.js"></script>
</head>
<body>
<!-- 中部开始 -->
<div class="wrapper">
    <!-- 右侧主体开始 -->
    <div class="page-content">
        <div class="content">
            <!-- 右侧内容框架，更改从这里开始 -->
            <form class="layui-form" action="${pageContext.request.contextPath}/admin/editCoConfirm.action" method="post">
                <input type="text" name="coachid" value="${editShowCo.coachid}" hidden>
                <div class="layui-form-item">
                    <label for="L_phone" class="layui-form-label">
                        <span class="x-red">*</span>电话
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="L_phone" name="coachLogName" required="" lay-verify="phone"
                               autocomplete="off" autofocus class="layui-input" value="${editShowCo.coachLogName}">
                    </div>
                    <div class="layui-form-mid layui-word-aux" id="spanPhone">
                        <span class="x-red" >*</span>将会成为您唯一的登入名
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_pass" class="layui-form-label">
                        <span class="x-red">*</span>密码
                    </label>
                    <div class="layui-input-inline">
                        <input type="password" id="L_pass" name="coachpassword" required="" lay-verify="pass"
                               autocomplete="off" class="layui-input" value="${editShowCo.coachpassword}">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        6到16个字符
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_coachrealname" class="layui-form-label">
                        <span class="x-red">*</span>真实名字
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="L_coachrealname" name="coachrealname" required="" lay-verify="realname"
                               autocomplete="off" class="layui-input" value="${editShowCo.coachrealname}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_sex" class="layui-form-label">
                        <span class="x-red">*</span>性别
                    </label>
                    <div class="layui-input-inline">
                        <c:if test="${editShowCo.coachsex=='男'}">
                            <input type="radio" id="L_sex" name="coachsex" required="" lay-verify="sex" checked
                                   autocomplete="off" class="layui-input" value="男" title="男">
                            <input type="radio" id="L_sex2" name="coachsex" required="" lay-verify="sex"
                                   autocomplete="off" class="layui-input" value="女" title="女">
                        </c:if>
                        <c:if test="${editShowCo.coachsex=='女'}">
                            <input type="radio" id="L_sex" name="coachsex" required="" lay-verify="sex"
                                   autocomplete="off" class="layui-input" value="男" title="男">
                            <input type="radio" id="L_sex2" name="coachsex" required="" lay-verify="sex" checked
                                   autocomplete="off" class="layui-input" value="女" title="女">
                        </c:if>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_address" class="layui-form-label">
                        <span class="x-red">*</span>住址
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="L_address" name="address" required="" lay-verify="address"
                               autocomplete="off" class="layui-input" value="${editShowCo.address}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_hiredate" class="layui-form-label">
                        <span class="x-red">*</span>入职时间
                    </label>
                    <div class="layui-input-inline">
                        <input type="date" id="L_hiredate" name="hiredate" required="required" lay-verify="date"
                               autocomplete="off" class="layui-input" value='<fmt:formatDate value="${editShowCo.hiredate}" pattern="yyyy-MM-dd"/>'>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_cotype" class="layui-form-label">
                        <span class="x-red">*</span>教学类型
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="L_cotype" name="cotype" required="" lay-verify="cotype"
                               autocomplete="off" class="layui-input" value="${editShowCo.cotype}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_cotype" class="layui-form-label">
                    </label>
                    <button type="button" class="layui-btn" lay-filter="add" lay-submit="" onclick="edits()">
                        修改
                    </button>
                    &nbsp;&nbsp;&nbsp;
                    <button  class="layui-btn" lay-filter="add" lay-submit="" onclick="javascript:x_admin_close();">
                        返回
                    </button>
                </div>
            </form>
        </div>
            <!-- 右侧内容框架，更改从这里结束 -->
        </div>
    </div>
    <!-- 右侧主体结束 -->
</div>
<!-- 中部结束 -->
<script>
    function edits() {
        layer.confirm('确认要修改吗？',function(){
            $(".layui-form").submit();
            layer.msg('修改成功', {icon: 1});
        });
    }
</script>
</body>
</html>
